/**
 * 
 */
package com.iwords.service.object;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 * @author qianxiang
 * 
 */
@Entity
@Table(name = "feedback")
public class FeedbackEntity implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -5104469110830901920L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	
	//private Long userid;
	
	private String comments;
	
	private String responses;
	
	private Byte status;
	
	@ManyToOne( optional = false)
	@JoinColumn(name = "userid")
	private UserEntity user;
	
	@Temporal(javax.persistence.TemporalType.TIMESTAMP)
	private Date createtime;
	
	@Temporal(javax.persistence.TemporalType.TIMESTAMP)
	private Date updatetime;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public String getResponses() {
		return responses;
	}

	public void setResponses(String responses) {
		this.responses = responses;
	}

	public Byte getStatus() {
		return status;
	}

	public void setStatus(Byte status) {
		this.status = status;
	}

	public UserEntity getUser() {
		return user;
	}

	public void setUser(UserEntity user) {
		this.user = user;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	@Override
	public String toString() {
		return "FeedbackEntity [id=" + id + ", comments=" + comments + ", responses=" + responses + ", status=" + status + ", user=" + user + ", createtime=" + createtime
				+ ", updatetime=" + updatetime + "]";
	}

}
